dev: improve HTTP download error handling for wget
and curl
#5962
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR improves the error handling and consistency between
http_download_curl
andhttp_download_wget
ininstall.sh
.Changes
http_download_curl
to uselog_err
for non-200 HTTP status codes instead oflog_debug
.http_download_wget
to:wget --server-response
.1
for non-200 HTTP responses, matching the behavior ofhttp_download_curl
.log_err
for better visibility.http_download
to directly callhttp_download_wget
after its availability check.Why
Previously,
http_download_wget
did not validate HTTP response codes, which led to misleading behavior. For example, when GitHub returned an HTTP 503, the installer incorrectly reported that the requested version did not exist:In this case, the tag
v1.64.8
did exist, but the underlying issue was a GitHub service error returning a503
. By properly checking and logging HTTP response codes, this update makes such scenarios clearer to users and avoids misleading "version not found" messages.